<template>
    <!-- <div v-if="hasPerms('customer:school:see')"> -->
    <div
        class="addSchool"
        v-loading="loading"
        element-loading-text="拼命添加中。。。。"
        element-loading-spinner="el-icon-loading"
    >
        <div class="addstu-box">
            <div class="title">
                <h1>三方信息</h1>
            </div>
            <div class="addstu-box-contain2">
                <el-form ref="schoolInfo" :rules="fieldRules" :inline="true" :model="schoolInfo">
                    <el-row>
                        <el-col :span="8">
                            <el-row>
                                <el-col :span="8">
                                    <b>三方姓名：</b>
                                </el-col>
                                <el-col :span="13">
                                    <el-form-item label prop="contact" style="width:100%;">
                                        <el-input
                                            v-if="hasPerms('directCampCenter:MyThree:edit:contact'||'directCampCenter:MyThree:edit:contact')"
                                            :disabled="!hasPerms('directCampCenter:MyThree:edit:contact'||'directCampCenter:tz:MyThree:edit:contact')?true:false"
                                            v-model="schoolInfo.contact"
                                            placeholder="三方姓名"
                                        ></el-input>
                                        <el-input
                                            v-if="!hasPerms('directCampCenter:MyThree:edit:contact'||'directCampCenter:tz:MyThree:edit:contact')"
                                            :disabled="pageId?true:false"
                                            v-model="schoolInfo.contact"
                                            placeholder="三方姓名"
                                        ></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </el-col>
                        <el-col :span="8">
                            <el-row>
                                <el-col :span="8">
                                    <b>联系电话：</b>
                                </el-col>
                                <el-col :span="13">
                                    <el-form-item label style="width:100%;">
                                        <el-input v-model="schoolInfo.phone" placeholder="联系电话"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </el-col>
                        <el-col :span="8">
                            <el-row>
                                <el-col :span="8">
                                    <b>分成比例：</b>
                                </el-col>
                                <el-col :span="13">
                                    <el-form-item
                                        label
                                        :prop="createType==13?'':'thirdProportion'"
                                        style="width:100%;"
                                    >
                                        <el-input
                                            type="text"
                                            v-model="schoolInfo.thirdProportion"
                                            placeholder="三方分成比例"
                                            @change="Proportion"
                                        ></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="8">
                            <el-row>
                                <el-col :span="8">
                                    <b>三方单位：</b>
                                </el-col>
                                <el-col :span="13">
                                    <el-form-item label prop="name" style="width:100%;">
                                        <el-input
                                            v-if="hasPerms('directCampCenter:MyThree:edit:name'||'directCampCenter:tz:MyThree:edit:name')"
                                            :disabled="!hasPerms('directCampCenter:MyThree:edit:name'||'directCampCenter:tz:MyThree:edit:name')?true:false"
                                            v-model="schoolInfo.name"
                                            placeholder="三方单位"
                                        ></el-input>
                                        <el-input
                                            v-if="!hasPerms('directCampCenter:MyThree:edit:name'||'directCampCenter:tz:MyThree:edit:name')"
                                            v-model="schoolInfo.name"
                                            :disabled="pageId?true:false"
                                            placeholder="三方单位"
                                        ></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </el-col>
                        <el-col :span="8">
                            <el-row>
                                <el-col :span="8">
                                    <b>意向程度：</b>
                                </el-col>
                                <el-col :span="13">
                                    <el-form-item label style="width:100%;">
                                        <el-select
                                            v-model="schoolInfo.tripartiteType"
                                            clearable
                                            placeholder="请选择"
                                            @change="schoolTypeChange"
                                        >
                                            <el-option
                                                v-for="item in tripartiteTypeOption"
                                                :key="item.key"
                                                :label="item.value"
                                                :value="item.key"
                                            ></el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="2" style="margin-right:25px">
                            <b>所在地区：</b>
                        </el-col>
                        <el-col :span="10" style="text-algin:left">
                            <el-form-item label prop="selectedOptions" style="width:100%;">
                                <el-cascader
                                    size="large"
                                    :options="options"
                                    v-model="schoolInfo.selectedOptions"
                                    @change="handleChange"
                                ></el-cascader>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-input v-model="schoolInfo.address" placeholder="请输入详细地址"></el-input>
                        </el-col>
                    </el-row>
                </el-form>
            </div>
        </div>
        <div class="btnBox">
            <KtButton
                :label="$t('action.close')"
                perms="true"
                size="medium"
                style="margin-right: 2%;"
                @click="closeSelectedTag"
            ></KtButton>
            <!-- <kt-button
                v-if="createType==4"
                class="stu-btn"
                label="保存并提交审核"
                perms="true"
                size="medium"
                :loading="editLoading"
                @click="handleSave('fieldRules')"
            />-->
            <kt-button
                class="stu-btn"
                label="保存"
                perms="true"
                size="medium"
                :loading="editLoading"
                @click="handleSave('fieldRules')"
            />
        </div>
        <!-- 查重 -->
        <Checkrepeat
            @colsePop="colsePop"
            @openAsking="openAsking"
            :checkrepeatShow="checkrepeatShow"
            :checkloading="checkloading"
        ></Checkrepeat>
    </div>
</template>
<script>
import { hasPermission } from "@/permission/index.js";
import axios from "axios";
import KtButton from "@/views/Core/KtButton";
import api from "@/http/api";
import StTable from "@/views/Core/StTable";
import { regionDataPlus } from "element-china-area-data";
import Checkrepeat from "@/views/Core/Checkrepeat";
import { isMobile } from "@/utils/validate";
export default {
    name: "AddSchool",
    components: {
        KtButton,
        StTable,
        Checkrepeat
    },
    data() {
        var checkPhone = (rule, value, callback) => {
            if (!isMobile(value)) {
                return callback(new Error("手机号码不对！"));
            } else {
                callback();
            }
        };
        var checkSchoolSystem = (rule, value, callback) => {
            let a = [];
            a.push(value);
            if (a.length == 0 || value == "" || value == undefined) {
                return callback(new Error("年级不能为空！"));
            } else {
                callback();
            }
        };
        var checkThirdName = (rule, value, callback) => {
            if (!this.isSffc) {
                if (value == "" || value == undefined) {
                    return callback(new Error("第三方姓名不能为空！"));
                } else {
                    callback();
                }
            } else {
                callback();
            }
        };
        var checkThirdPhone = (rule, value, callback) => {
            if (this.isSffc == false) {
                if (!isMobile(value)) {
                    return callback(new Error("第三方手机号码不对！"));
                } else {
                    callback();
                }
            } else {
                callback();
            }
        };
        var checkThirdContractSignedDate = (rule, value, callback) => {
            if (!this.isSffc) {
                if (value == "" || value == undefined) {
                    return callback(new Error("合同签署时间不能为空！"));
                } else {
                    callback();
                }
            } else {
                callback();
            }
        };
        var checkThirdContractEndDate = (rule, value, callback) => {
            if (!this.isSffc) {
                if (value == "" || value == undefined) {
                    return callback(new Error("合同到期时间不能为空！"));
                } else {
                    callback();
                }
            } else {
                callback();
            }
        };
        // var checkSelectedOptions = (rule, value, callback) => {
        //     if (value == "" || value == undefined) {
        //         return callback(new Error("所在地区不能为空！"));
        //     } else {
        //         callback();
        //     }
        // };
        return {
            schoolInfo: {
                thirdProportion: 0,
                selectedOptions: [],
                name: "",
                contact: "",
                phone: ""
            },
            schoolRecording: {
                belongToId: "",
                belongToName: "",
                charge: "",
                competitor: "",
                expectedClosingDate: "",
                feastNum: 0,
                isNeedEscape: 0,
                majorDifficulty: "",
                mettingNum: 0,
                neededSupport: "",
                nextPlan: "",
                operationSupportNum: 0,
                plannedPeopleNum: "",
                recordContent: "",
                recordType: "",
                schoolId: 0,
                teachingSupportNum: 0,
                technicalSupportNum: 0,
                trackingDateEnd: "",
                trackingDateStart: "",
                userId: "",
                visitDays: 0,
                visitNum: 0
            },
            student_progress_options: [
                {
                    label: " ",
                    key: " "
                }
            ],
            student_data_from_type_options: [
                {
                    label: " ",
                    key: " "
                }
            ],
            schoolSystem: [], //年级
            isSffc: true,
            loading: false,
            student_system_cache_options: [
                {
                    label: " ",
                    key: " "
                }
            ],

            student_level_cache_options: [
                {
                    key: " ",
                    value: " "
                }
            ],

            student_data_from_options: [
                {
                    label: " ",
                    key: " "
                }
            ],

            student_type_options: [
                {
                    label: " ",
                    key: " "
                }
            ],
            student_progress_options: [
                {
                    label: " ",
                    key: " "
                }
            ],

            //   表单验证
            fieldRules: {
                thirdProportion: [
                    {
                        required: true,
                        message: "分成比例不能为空",
                        trigger: "blur"
                    }
                ],
                canNotBlank: [
                    { required: true, message: "不能为空", trigger: "blur" }
                ],
                name: [
                    {
                        required: true,
                        message: "三方单位不能为空",
                        trigger: "blur"
                    }
                ],
                contact: [
                    {
                        required: true,
                        message: "三方姓名不能为空",
                        trigger: "blur"
                    }
                ],
                peopleNum: [
                    {
                        required: true,
                        message: "学校人数不能为空",
                        trigger: "blur"
                    }
                ],
                schoolSystem1: [
                    {
                        validator: checkSchoolSystem,
                        required: true,
                        trigger: "change"
                    }
                ],
                type: [
                    {
                        required: true,
                        message: "客户类型不能为空",
                        trigger: "change"
                    }
                ],
                duty: [
                    { required: true, message: "职位不能为空", trigger: "blur" }
                ],
                phone: [
                    { validator: checkPhone, required: true, trigger: "blur" }
                ],
                thirdName: [
                    {
                        validator: checkThirdName,
                        required: true,
                        trigger: "blur"
                    }
                ],
                thirdPhone: [
                    {
                        validator: checkThirdPhone,
                        required: true,
                        trigger: "blur"
                    }
                ],
                thirdContractSignedDate: [
                    {
                        validator: checkThirdContractSignedDate,
                        required: true,
                        trigger: "blur"
                    }
                ],
                thirdContractEndDate: [
                    {
                        validator: checkThirdContractEndDate,
                        required: true,
                        trigger: "blur"
                    }
                ],
                paymentSituation: [
                    {
                        required: true,
                        message: "回款情况不能为空",
                        trigger: "blur"
                    }
                ],
                feastNum: [
                    {
                        required: true,
                        message: "宴请次数不能为空",
                        trigger: "blur"
                    }
                ],
                mettingNum: [
                    {
                        required: true,
                        message: "参会次数不能为空",
                        trigger: "blur"
                    }
                ],
                visitNum: [
                    {
                        required: true,
                        message: "拜访次数不能为空",
                        trigger: "blur"
                    }
                ],
                // selectedOptions: [
                //     {
                //         validator: checkSelectedOptions,
                //         required: true,
                //         trigger: "change"
                //     }
                // ],
                trackingDate: [
                    {
                        required: true,
                        message: "跟进日期不能为空",
                        trigger: "blur"
                    }
                ],
                recordType: [
                    {
                        required: true,
                        message: "报备类别不能为空",
                        trigger: "change"
                    }
                ],
                recordContent: [
                    {
                        required: true,
                        message: "跟踪情况不能为空",
                        trigger: "blur"
                    }
                ],
                nextPlan: [
                    {
                        required: true,
                        message: "下次跟进计划不能为空",
                        trigger: "blur"
                    }
                ],
                majorDifficulty: [
                    {
                        required: true,
                        message: "项目主要障碍不能为空",
                        trigger: "blur"
                    }
                ],
                neededSupport: [
                    {
                        required: true,
                        message: "需要的支持不能为空",
                        trigger: "blur"
                    }
                ],
                competitor: [
                    {
                        required: true,
                        message: "竞争对手不能为空",
                        trigger: "blur"
                    }
                ],
                charge: [
                    {
                        required: true,
                        message: "收费标准不能为空",
                        trigger: "blur"
                    }
                ],
                expectedClosingDate: [
                    {
                        required: true,
                        message: "预计成交时间不能为空",
                        trigger: "blur"
                    }
                ],
                plannedPeopleNum: [
                    {
                        required: true,
                        message: "计划招生人数不能为空",
                        trigger: "blur"
                    }
                ]
            },
            fieldRules2: {
                trackingDate: [
                    {
                        required: true,
                        message: "跟进日期不能为空",
                        trigger: "blur"
                    }
                ],
                recordType: [
                    {
                        required: true,
                        message: "报备类别不能为空",
                        trigger: "change"
                    }
                ],
                recordContent: [
                    {
                        required: true,
                        message: "跟踪情况不能为空",
                        trigger: "blur"
                    }
                ],
                nextPlan: [
                    {
                        required: true,
                        message: "下次跟进计划不能为空",
                        trigger: "blur"
                    }
                ],
                majorDifficulty: [
                    {
                        required: true,
                        message: "项目主要障碍不能为空",
                        trigger: "blur"
                    }
                ],
                neededSupport: [
                    {
                        required: true,
                        message: "需要的支持不能为空",
                        trigger: "blur"
                    }
                ],
                competitor: [
                    {
                        required: true,
                        message: "竞争对手不能为空",
                        trigger: "blur"
                    }
                ],
                charge: [
                    {
                        required: true,
                        message: "收费标准不能为空",
                        trigger: "blur"
                    }
                ],
                expectedClosingDate: [
                    {
                        required: true,
                        message: "预计成交时间不能为空",
                        trigger: "blur"
                    }
                ],
                plannedPeopleNum: [
                    {
                        required: true,
                        message: "计划招生人数不能为空",
                        trigger: "blur"
                    }
                ]
            },
            //   地区
            options: regionDataPlus,
            selectedOptions: [], //省市区数组
            contractDate: [], //时间数据
            schoolSectionArr: [], //学段数组
            selection: false,
            stuTableData: [],
            columns: [
                { prop: "id", label: "序号", minWidth: 50 },
                { prop: "usernumber", label: "跟进时间", minWidth: 80 },
                { prop: "name", label: "三方姓名", minWidth: 80 },
                { prop: "OEM", label: "沟通形式", minWidth: 80 },
                { prop: "OEMcategory", label: "客户类型", minWidth: 100 },
                { prop: "role", label: "客户进展", minWidth: 70 },
                {
                    prop: "threeDepartment",
                    label: "下次跟进时间",
                    minWidth: 100
                }
            ],
            pageResult: {},
            pageRequest: { pageNum: 1, pageSize: 10 },
            editLoading: false,
            createType: 2,
            checkrepeatShow: false,
            checkloading: false,
            checkMessage: "",
            isLoadingSuccess: false,
            school_recordType_options: [],
            infoData: [
                {
                    name: "111",
                    content: ""
                },
                {
                    name: "222",
                    content: ""
                }
            ],
            tripartiteTypeOption:[],
            pageId: this.$route.query.id
        };
    },
    watch: {
        // $route: "getParams"
    },
    beforeMount: function() {
        //   请求页面传过来的ID根据ID发送请求
        let routerParams = this.$route.query;
        let id = routerParams.id;
        let createTypeFlag = routerParams.createType;
        this.createType = createTypeFlag;
        if (id) {
            this.$api.agent
                .queryByIdTripartiteList({
                    id: id
                })
                .then(res => {
                    if (res.result == 2) {
                        this.$message({ message: res.msg, type: "error" });
                    } else {
                        let resData = res.data;
                        this.schoolInfo = res.data;
                        
                        //省市区赋值
                        let str = /^[\u4e00-\u9fa5]+$/;
                        let selectedOptions = [];
                        if (
                            !str.test(resData.province) &&
                            !str.test(resData.city) &&
                            !str.test(resData.area)
                        ) {
                            selectedOptions.push(
                                "" + JSON.parse(resData.province) + "",
                                "" + JSON.parse(resData.city) + "",
                                "" + JSON.parse(resData.area) + ""
                            );

                            this.schoolInfo.selectedOptions = selectedOptions;
                        }
                    }
                });
        }
    },
    methods: {
        hasPerms: function(perms) {
            // 根据权限标识和外部指示状态进行权限判断
            return hasPermission(perms) & !this.disabled;
        },

        handleFollow(index, row) {
            this.$emit("handleFollow", { index: index, row: row });
            this.dataForm = Object.assign({}, params.row);
            this.$router.push({ path: "/Follow/SchoolFollow" });
        },
        // 选择跟进类型
        recordTypeChange(params) {
            this.getRecordType(params);
        },
        // 保存
        handleSave() {
            let data = Object.assign({}, this.schoolInfo);
            //省市区
            this.editLoading = true;
            let province = data.selectedOptions[0];
            let city = data.selectedOptions[1];
            let area = data.selectedOptions[2];
            this.schoolInfo.province = province;
            this.schoolInfo.city = city;
            this.schoolInfo.area = area;
            // 判断手机号
            try {
                let phones = [];
                if (this.schoolInfo.phone != "") {
                    if (this.schoolInfo.phone.indexOf(",") > -1) {
                        phones = this.schoolInfo.phone.split(",");
                        phones.some((item, index) => {
                            if (!isMobile(item)) {
                                this.$message({
                                    message:
                                        "第" + (index + 1) + "个手机号错误！",
                                    type: "error"
                                });
                                throw new Error("ending");
                            }
                            this.editLoading = false;
                        });
                    }
                }
            } catch (e) {
                if (e.message == "ending") {
                    return;
                } else {
                    console.log(e.message);
                }
            }
            //时间
            let contractDateArr = this.contractDate;
            this.schoolInfo.contractStartDate = contractDateArr[0]; //开始时间
            this.schoolInfo.contractEndDate = contractDateArr[1]; //结束时间
            if (this.schoolRecording.trackingDate) {
                this.schoolRecording.trackingDateStart = this.schoolRecording.trackingDate[0];
                this.schoolRecording.trackingDateEnd = this.schoolRecording.trackingDate[1];
            }
            //分成比例去掉百分号
            this.schoolInfo.thirdProportion = parseFloat(
                this.schoolInfo.thirdProportion
            );
            // let postData = {
            //     schoolInfo: this.schoolInfo,
            //     schoolRecording: this.schoolRecording,
            //     createType: this.createType
            // };
            let dataType=''
            // 获取参数判断是否是商务拓展中心
            if(this.$route.fullPath.indexOf('dataType=2')>-1){
                // dataType=this.$route.query.dataType
                this.schoolInfo.dataType=2
            }
            this.$refs.schoolInfo.validate(valid => {
                if (!valid) {
                    this.editLoading = false;
                } else {
                    this.loading = true;
                    if (this.$route.query.id) {
                        this.$api.agent
                            .schoolTripartiteUpdate(this.schoolInfo)
                            .then(res => {
                                if (res.result === 1) {
                                    this.$message({
                                        message: res.msg,
                                        center: true,
                                        type: "success"
                                    });
                                    this.loading = false;
                                    this.editLoading = false;
                                    this.closeSelectedTag();
                                    this.$refs.schoolInfo.resetFields();
                                } else if (res.result === 2) {
                                    this.$message({
                                        message: res.msg,
                                        center: true,
                                        type: "error"
                                    });
                                    this.loading = false;
                                    this.editLoading = false;
                                }
                            });
                    } else {
                        this.$api.agent
                            .schoolTripartiteAdd(this.schoolInfo)
                            .then(res => {
                                if (res.result === 1) {
                                    this.$message({
                                        message: res.msg,
                                        center: true,
                                        type: "success"
                                    });
                                    this.loading = false;
                                    this.editLoading = false;
                                    this.closeSelectedTag();
                                    this.$refs.schoolInfo.resetFields();
                                } else if (res.result === 2) {
                                    this.$message({
                                        message: res.msg,
                                        center: true,
                                        type: "error"
                                    });
                                    this.loading = false;
                                    this.editLoading = false;
                                }
                            });
                    }
                }

                this.editLoading = false;
            });
        },

        // 关闭保存
        isActive(route) {
            return route.path === this.$route.path;
        },
        closeSelectedTag(view) {
            this.$store.dispatch("delVisitedViews", this.$route).then(views => {
                if (this.isActive(this.$route)) {
                    const latestView = views.slice(-1)[0];
                    if (latestView) {
                        this.$router.push(latestView);
                    } else {
                        this.$router.push("/");
                    }
                }
            });
        },

        // 获取地区
        handleChange(value) {
            this.schoolInfo.city = value;
        },

        get_system_cache() {
            this.$api.user
                .optionsList({ codeType: "system_cache" })
                .then(res => {
                    this.student_system_cache_options = res.systemList;
                });
        },

        get_level_cache() {
            this.$api.dropdown.tripartiteType().then(res => {
                if (res.result == 2) {
                    this.$message({ message: res.msg, type: "error" });
                } else {
                    this.tripartiteTypeOption = res.keyValueList;
                }
            });
        },

        get_student_data_from() {
            this.$api.user
                .optionsList({ codeType: "school_data_from" })
                .then(res => {
                    this.student_data_from_options = res.keyValueList;
                });
        },

        student_data_from_change(value) {
            this.schoolInfo.dataFrom = value.toString();
        },

        // 客户类型
        get_student_type() {
            this.$api.user
                .optionsList({ codeType: "school_type" })
                .then(res => {
                    this.student_type_options = res.keyValueList;
                });
            this.school_recordType_options = JSON.parse(
                localStorage.getItem("schoolRecordTypeOptions")
            );
        },

        // 客户进展
        get_student_progress() {
            this.$api.user
                .optionsList({ codeType: "school_progress" })
                .then(res => {
                    this.student_progress_options = res.keyValueList;
                });
        },

        student_progress_change(value) {
            this.queryBox.student_progressValue = value.toString();
        },
        //客户类型改变事件
        schoolTypeChange(value) {
            let choseValue = value;
            if (choseValue == 4) {
                this.schoolInfo.progress = "6";
            }
        },
        //客户进展改变事件
        schoolProgressChange(value) {
            let choseValue = value;
            if (choseValue == 6) {
                this.schoolInfo.type = "4";
            }
        },
        // 关闭查重弹窗
        colsePop(val) {
            this.checkrepeatShow = false;
        },
        openAsking() {
            this.checkrepeatShow = true;
        },
        Proportion(val) {
            if (val != 0) {
                if (val > 100) {
                    this.$message({
                        message: "请输入正确的分成比例！",
                        type: "error"
                    });
                    return false;
                }
                this.schoolInfo.thirdProportion = val + "%";
                this.isSffc = !this.isSffc;
            } else if (val == 0 || val > 100) {
                this.isSffc = !this.isSffc;
            }
        }
    },

    mounted() {
        // this.get_system_cache();
        this.get_level_cache();
        // this.get_student_data_from();
        this.get_student_type();
        // this.get_student_progress()
    }
};
</script>
<style lang="scss" scoped>
.btnBox {
    padding-bottom: 30px;
}
.addstu-box-contain2 {
    i {
        font-style: normal;
    }
    .el-row {
        .el-col b {
            font-style: normal;
            text-align: right;
            float: left;
            font-size: 14px;
            color: #606266;
            line-height: 40px;
            padding: 0 0 0 0;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            font-weight: normal;
        }
    }
}
.addSchool .el-row .el-col {
    margin-left: 0 !important;
}
.container .el-radio-group .el-radio:first-child {
    display: inline-block !important;
}
.addstu-box .el-cascader {
    width: 100% !important;
}
.addSchool .addstu-box {
    text-align: left;
    width: 90%;
    margin: 20px auto;
    border: 1px solid #e4e7ed;
    padding-bottom: 20px;
    .el-row {
        margin: 0 0 2% 0;
    }
    .el-select {
        width: 100%;
    }
    .title h1 {
        font-size: 20px;
        font-weight: bold;
        padding: 20px;
    }
    .addstu-box-contain2 {
        margin: 0 auto;
        width: 90%;
    }
    .city-title {
        text-align: right;
        float: left;
        font-size: 14px;
        color: #606266;
        line-height: 40px;
        padding: 0 12px 0 0;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }
}
.addSchool .addstu-box {
    .el-cascader {
        width: 100%;
    }
}
</style>
<style lang="scss">
.addSchool input::-webkit-outer-spin-button,
.addSchool input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0;
}
.addSchool .el-form--inline .el-form-item__content {
    width: 100%;
}
.addSchool .el-select {
    width: 100%;
}
.addSchool .el-form--inline .el-form-item {
    margin-bottom: 0 !important;
}
</style>
